package com.vpen.order.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Version 1.0
 * @Author: Vpen
 * @Date: 2021/3/16 22:34
 * @Content:
 */
@Configuration
public class ApplicationContextConfig {
  /**
   * @author:韦鹏
   * @desc: 负载均衡
   * */
    @Bean("restTemplate")
    @LoadBalanced
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
